<head>
<meta http-equiv='content-type' content='text/html; charset=utf8' />
<title>jsGoo tests</title><link rel='stylesheet' href='main.css' type='text/css' />
<script type='text/javascript' src='jsgoo.js'></script>
<script type='text/javascript'>

var sayHi = function(el) { alert('ops!'); return false; }

var showAdd = function() { _.$into('form', _f.render(DATA.form, 'form1', 'sayHi')); }

var DATA = {
    form: { action: "/insert", method: "post",
        fields: {
            name:       { label: "Name",        inp: { type: "text", name: "name" } },
            group:      { label: "Group", 		
						  inp: { type: "select", name: "group", options: [ "monkeys", "giraffes", "elephants" ] }, 
                          help: 'Slect the group you`re in.' },
            descr:      { label: "Description", inp: { type: "textarea", name: "descr" }, 
                          help: 'Write the description in up to 40 words if you can.' },
            submit:     {                       inp: { type: "submit", value: 'Add', cls: "submit" } }
        }
    },
	
	places: [
		{ id: 5, xx: "xx", name: "jungle" },
		{ id: 10, xx: "xx",  name: "water" },
		{ id: 15, xx: "xx", name: "desert" },
	]
}
</script>
<body>
<div><a href="index.html">index</a> <a href="#" onclick="showAdd(); return false;">generate</a></div>
<div id="side-content"><div id="form" class="form"></div></div>
</body>
</html>
